#ifndef _BBCONTEXTMANAGER_H_
#define _BBCONTEXTMANAGER_H_


#include "BBSingleton.h"
#include <map>

class BBContext;
class IState;

class BBContextManager : public BBSingleton<BBContextManager>
{
public:
	BBContext* getContextByTag(int tag);
	void removeContext(int tag);
	void handlerContext(int tag);
	void changeContextState(int tag,IState* state);
	void purgeContextManager();
private:
	BBContextManager(void);
	~BBContextManager(void);
	friend class BBSingleton<BBContextManager>;
private:
	std::map<int,BBContext*> m_pContextList;
};


#endif //_BBCONTEXTMANAGER_H_